﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TTEngine
{
    public class GoldCoin : MapObject
    {
        //constructor
        public GoldCoin()
            : base()
        {
            CanTake = true;
            UnitWeight = 1.0f / 100.0f;
            LootLevel = 1;
        }

        //object name
        public override string ObjectName
        {
            get
            {
                return "Gold Coin";
            }
        }

        //clone
        public override MapObject Clone()
        {
            return new GoldCoin();
        }

        //image
        public override Bitmap Image
        {
            get
            {
                return Properties.Resources.GoldCoins;
            }
        }

        //quantity for loot
        public override void LootProcessing(int difficultyLevel)
        {
            while (difficultyLevel > 0)
            {
                int num = Globals.RandomIntFromTo(0, 10);
                do
                {
                    Quantity += num;
                    num = Globals.RandomIntFromTo(0, 10);
                }
                while (num > 8);
                difficultyLevel--;
            }
        }
    }
}
